package cn.gson.crm.model.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import cn.gson.crm.model.pojo.Backplan;

@Repository
public interface BackplanDAO extends CrudRepository<Backplan, Long> {
	@Query("select b from Backplan b order by b.id desc")
	public List<Backplan> getAllBackplan(Pageable pageable);
	
	@Query("from Backplan b where b.id = ?1")
	public Backplan getBackPlanById(Long id);
}
